package homework3;

import java.util.ArrayList;

//Question类    试题类
//属性：题目描述    若干选项    正确答案
//提示：若干选项用ArrayList存放
public class Question {
	private String id;
	private String describe;
	private ArrayList<String> arrayList;
	private String right;
	private int score;
	public Question(String describe, ArrayList<String> arrayList, String right) {
		super();
		this.describe = describe;
		this.arrayList = arrayList;
		this.right = right;
		this.id=id;
	}
	public Question(){}
	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public ArrayList<String> getArrayList() {
		return arrayList;
	}

	public void setArrayList(ArrayList<String> arrayList) {
		this.arrayList = arrayList;
	}

	public String getRight() {
		return right;
	}

	public void setRight(String right) {
		this.right = right;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		StringBuffer sb = new StringBuffer(id+"."+describe+"\n");
		for(int i=0;i<arrayList.size();i++){
			sb.append((char)(i+'A')).append(".").append(arrayList.get(i)+"\n");
		}
		sb.append("\n");
		return sb.toString();
	}
	
}
